package org.jivesoftware.smackx.workgroup.agent;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.jivesoftware.smack.Connection;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.filter.PacketTypeFilter;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.packet.Presence.Type;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.workgroup.packet.AgentStatusRequest;
import org.jivesoftware.smackx.workgroup.packet.AgentStatusRequest.Item;

public class AgentRoster
{
  private static final int EVENT_AGENT_ADDED = 0;
  private static final int EVENT_AGENT_REMOVED = 1;
  private static final int EVENT_PRESENCE_CHANGED = 2;
  private Connection connection;
  private List<String> entries;
  private List<AgentRosterListener> listeners;
  private Map<String, Map<String, Presence>> presenceMap;
  boolean rosterInitialized = false;
  private String workgroupJID;

  AgentRoster(Connection paramConnection, String paramString)
  {
    this.connection = paramConnection;
    this.workgroupJID = paramString;
    this.entries = new ArrayList();
    this.listeners = new ArrayList();
    this.presenceMap = new HashMap();
    PacketTypeFilter localPacketTypeFilter = new PacketTypeFilter(AgentStatusRequest.class);
    paramConnection.addPacketListener(new AgentStatusListener(this, null), localPacketTypeFilter);
    paramConnection.addPacketListener(new PresencePacketListener(this, null), new PacketTypeFilter(Presence.class));
    AgentStatusRequest localAgentStatusRequest = new AgentStatusRequest();
    localAgentStatusRequest.setTo(paramString);
    paramConnection.sendPacket(localAgentStatusRequest);
  }

  // ERROR //
  private void fireEvent(int paramInt, Object paramObject)
  {
    // Byte code:
    //   0: aconst_null
    //   1: checkcast 104	[Lorg/jivesoftware/smackx/workgroup/agent/AgentRosterListener;
    //   4: pop
    //   5: aload_0
    //   6: getfield 49	org/jivesoftware/smackx/workgroup/agent/AgentRoster:listeners	Ljava/util/List;
    //   9: astore 4
    //   11: aload 4
    //   13: monitorenter
    //   14: aload_0
    //   15: getfield 49	org/jivesoftware/smackx/workgroup/agent/AgentRoster:listeners	Ljava/util/List;
    //   18: invokeinterface 110 1 0
    //   23: anewarray 112	org/jivesoftware/smackx/workgroup/agent/AgentRosterListener
    //   26: astore 6
    //   28: aload_0
    //   29: getfield 49	org/jivesoftware/smackx/workgroup/agent/AgentRoster:listeners	Ljava/util/List;
    //   32: aload 6
    //   34: invokeinterface 116 2 0
    //   39: pop
    //   40: aload 4
    //   42: monitorexit
    //   43: iconst_0
    //   44: istore 8
    //   46: iload 8
    //   48: aload 6
    //   50: arraylength
    //   51: if_icmplt +12 -> 63
    //   54: return
    //   55: astore 5
    //   57: aload 4
    //   59: monitorexit
    //   60: aload 5
    //   62: athrow
    //   63: iload_1
    //   64: tableswitch	default:+28 -> 92, 0:+34->98, 1:+51->115, 2:+68->132
    //   93: iconst_5
    //   94: aconst_null
    //   95: goto -49 -> 46
    //   98: aload 6
    //   100: iload 8
    //   102: aaload
    //   103: aload_2
    //   104: checkcast 118	java/lang/String
    //   107: invokeinterface 121 2 0
    //   112: goto -20 -> 92
    //   115: aload 6
    //   117: iload 8
    //   119: aaload
    //   120: aload_2
    //   121: checkcast 118	java/lang/String
    //   124: invokeinterface 124 2 0
    //   129: goto -37 -> 92
    //   132: aload 6
    //   134: iload 8
    //   136: aaload
    //   137: aload_2
    //   138: checkcast 75	org/jivesoftware/smack/packet/Presence
    //   141: invokeinterface 128 2 0
    //   146: goto -54 -> 92
    //
    // Exception table:
    //   from	to	target	type
    //   14	43	55	finally
    //   57	60	55	finally
  }

  private String getPresenceMapKey(String paramString)
  {
    String str = paramString;
    if (!(contains(paramString)))
      str = StringUtils.parseBareAddress(paramString).toLowerCase();
    return str;
  }

  // ERROR //
  public void addListener(AgentRosterListener paramAgentRosterListener)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 49	org/jivesoftware/smackx/workgroup/agent/AgentRoster:listeners	Ljava/util/List;
    //   4: astore_2
    //   5: aload_2
    //   6: monitorenter
    //   7: aload_0
    //   8: getfield 49	org/jivesoftware/smackx/workgroup/agent/AgentRoster:listeners	Ljava/util/List;
    //   11: aload_1
    //   12: invokeinterface 146 2 0
    //   17: ifne +35 -> 52
    //   20: aload_0
    //   21: getfield 49	org/jivesoftware/smackx/workgroup/agent/AgentRoster:listeners	Ljava/util/List;
    //   24: aload_1
    //   25: invokeinterface 149 2 0
    //   30: pop
    //   31: aload_0
    //   32: invokevirtual 153	org/jivesoftware/smackx/workgroup/agent/AgentRoster:getAgents	()Ljava/util/Set;
    //   35: invokeinterface 159 1 0
    //   40: astore 5
    //   42: aload 5
    //   44: invokeinterface 165 1 0
    //   49: ifne +6 -> 55
    //   52: aload_2
    //   53: monitorexit
    //   54: return
    //   55: aload 5
    //   57: invokeinterface 169 1 0
    //   62: checkcast 118	java/lang/String
    //   65: astore 6
    //   67: aload_0
    //   68: getfield 47	org/jivesoftware/smackx/workgroup/agent/AgentRoster:entries	Ljava/util/List;
    //   71: aload 6
    //   73: invokeinterface 146 2 0
    //   78: ifeq -36 -> 42
    //   81: aload_1
    //   82: aload 6
    //   84: invokeinterface 121 2 0
    //   89: aload_0
    //   90: getfield 54	org/jivesoftware/smackx/workgroup/agent/AgentRoster:presenceMap	Ljava/util/Map;
    //   93: aload 6
    //   95: invokeinterface 175 2 0
    //   100: checkcast 171	java/util/Map
    //   103: astore 7
    //   105: aload 7
    //   107: ifnull -65 -> 42
    //   110: aload 7
    //   112: invokeinterface 179 1 0
    //   117: invokeinterface 182 1 0
    //   122: astore 8
    //   124: aload 8
    //   126: invokeinterface 165 1 0
    //   131: ifeq -89 -> 42
    //   134: aload_1
    //   135: aload 8
    //   137: invokeinterface 169 1 0
    //   142: checkcast 75	org/jivesoftware/smack/packet/Presence
    //   145: invokeinterface 128 2 0
    //   150: goto -26 -> 124
    //   153: astore_3
    //   154: aload_2
    //   155: monitorexit
    //   156: aload_3
    //   157: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   7	156	153	finally
  }

  // ERROR //
  public boolean contains(String paramString)
  {
    // Byte code:
    //   0: aload_1
    //   1: ifnonnull +9 -> 10
    //   4: iconst_0
    //   5: istore 5
    //   7: iload 5
    //   9: ireturn
    //   10: aload_0
    //   11: getfield 47	org/jivesoftware/smackx/workgroup/agent/AgentRoster:entries	Ljava/util/List;
    //   14: astore_2
    //   15: aload_2
    //   16: monitorenter
    //   17: aload_0
    //   18: getfield 47	org/jivesoftware/smackx/workgroup/agent/AgentRoster:entries	Ljava/util/List;
    //   21: invokeinterface 183 1 0
    //   26: astore 4
    //   28: aload 4
    //   30: invokeinterface 165 1 0
    //   35: ifne +11 -> 46
    //   38: aload_2
    //   39: monitorexit
    //   40: iconst_0
    //   41: istore 5
    //   43: goto -36 -> 7
    //   46: aload 4
    //   48: invokeinterface 169 1 0
    //   53: checkcast 118	java/lang/String
    //   56: invokevirtual 141	java/lang/String:toLowerCase	()Ljava/lang/String;
    //   59: aload_1
    //   60: invokevirtual 141	java/lang/String:toLowerCase	()Ljava/lang/String;
    //   63: invokevirtual 186	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   66: ifeq -38 -> 28
    //   69: aload_2
    //   70: monitorexit
    //   71: iconst_1
    //   72: istore 5
    //   74: goto -67 -> 7
    //   77: astore_3
    //   78: aload_2
    //   79: monitorexit
    //   80: aload_3
    //   81: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   17	80	77	finally
  }

  public int getAgentCount()
  {
    return this.entries.size();
  }

  // ERROR //
  public Set<String> getAgents()
  {
    // Byte code:
    //   0: new 189	java/util/HashSet
    //   3: dup
    //   4: invokespecial 190	java/util/HashSet:<init>	()V
    //   7: astore_1
    //   8: aload_0
    //   9: getfield 47	org/jivesoftware/smackx/workgroup/agent/AgentRoster:entries	Ljava/util/List;
    //   12: astore_2
    //   13: aload_2
    //   14: monitorenter
    //   15: aload_0
    //   16: getfield 47	org/jivesoftware/smackx/workgroup/agent/AgentRoster:entries	Ljava/util/List;
    //   19: invokeinterface 183 1 0
    //   24: astore 4
    //   26: aload 4
    //   28: invokeinterface 165 1 0
    //   33: ifne +10 -> 43
    //   36: aload_2
    //   37: monitorexit
    //   38: aload_1
    //   39: invokestatic 196	java/util/Collections:unmodifiableSet	(Ljava/util/Set;)Ljava/util/Set;
    //   42: areturn
    //   43: aload_1
    //   44: aload 4
    //   46: invokeinterface 169 1 0
    //   51: checkcast 118	java/lang/String
    //   54: invokeinterface 197 2 0
    //   59: pop
    //   60: goto -34 -> 26
    //   63: astore_3
    //   64: aload_2
    //   65: monitorexit
    //   66: aload_3
    //   67: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   15	38	63	finally
    //   43	66	63	finally
  }

  public Presence getPresence(String paramString)
  {
    String str = getPresenceMapKey(paramString);
    Map localMap = (Map)this.presenceMap.get(str);
    if (localMap == null)
    {
      localObject = new Presence(Presence.Type.unavailable);
      ((Presence)localObject).setFrom(paramString);
      return localObject;
    }
    Iterator localIterator = localMap.keySet().iterator();
    Object localObject = null;
    while (true)
    {
      label97: Presence localPresence;
      do
        while (true)
        {
          while (true)
          {
            do
              if (localIterator.hasNext())
                break label97;
            while (localObject != null);
            localObject = new Presence(Presence.Type.unavailable);
            ((Presence)localObject).setFrom(paramString);
          }
          localPresence = (Presence)localMap.get(localIterator.next());
          if (localObject != null)
            break;
          localObject = localPresence;
        }
      while (localPresence.getPriority() <= ((Presence)localObject).getPriority());
      localObject = localPresence;
    }
  }

  public void reload()
  {
    AgentStatusRequest localAgentStatusRequest = new AgentStatusRequest();
    localAgentStatusRequest.setTo(this.workgroupJID);
    this.connection.sendPacket(localAgentStatusRequest);
  }

  public void removeListener(AgentRosterListener paramAgentRosterListener)
  {
    synchronized (this.listeners)
    {
      this.listeners.remove(paramAgentRosterListener);
      return;
    }
  }

  private class AgentStatusListener
  implements PacketListener
  {
    public void processPacket()
    {
      Iterator localIterator;
      if (paramPacket instanceof AgentStatusRequest)
        localIterator = ((AgentStatusRequest)paramPacket).getAgents().iterator();
      while (true)
      {
        String str1;
        while (true)
        {
          if (!(localIterator.hasNext()))
          {
            this.this$0.rosterInitialized = true;
            return;
          }
          AgentStatusRequest.Item localItem = (AgentStatusRequest.Item)localIterator.next();
          str1 = localItem.getJID();
          if (!("remove".equals(localItem.getType())))
            break;
          String str2 = StringUtils.parseName(StringUtils.parseName(str1) + "@" + StringUtils.parseServer(str1));
          AgentRoster.access$2(this.this$0).remove(str2);
          AgentRoster.access$4(this.this$0, 1, str1);
        }
        AgentRoster.access$3(this.this$0).add(str1);
        AgentRoster.access$4(this.this$0, 0, str1);
      }
    }
  }

  private class PresencePacketListener
  implements PacketListener
  {
    // ERROR //
    public void processPacket()
    {
      // Byte code:
      //   0: aload_1
      //   1: checkcast 25	org/jivesoftware/smack/packet/Presence
      //   4: astore_2
      //   5: aload_2
      //   6: invokevirtual 29	org/jivesoftware/smack/packet/Presence:getFrom	()Ljava/lang/String;
      //   9: astore_3
      //   10: aload_3
      //   11: ifnonnull +29 -> 40
      //   14: getstatic 35	java/lang/System:out	Ljava/io/PrintStream;
      //   17: new 37	java/lang/StringBuilder
      //   20: dup
      //   21: ldc 39
      //   23: invokespecial 42	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
      //   26: aload_2
      //   27: invokevirtual 45	org/jivesoftware/smack/packet/Presence:toXML	()Ljava/lang/String;
      //   30: invokevirtual 49	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
      //   33: invokevirtual 52	java/lang/StringBuilder:toString	()Ljava/lang/String;
      //   36: invokevirtual 57	java/io/PrintStream:println	(Ljava/lang/String;)V
      //   39: return
      //   40: aload_0
      //   41: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   44: aload_3
      //   45: invokestatic 61	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$0	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;Ljava/lang/String;)Ljava/lang/String;
      //   48: astore 4
      //   50: aload_2
      //   51: invokevirtual 65	org/jivesoftware/smack/packet/Presence:getType	()Lorg/jivesoftware/smack/packet/Presence$Type;
      //   54: getstatic 71	org/jivesoftware/smack/packet/Presence$Type:available	Lorg/jivesoftware/smack/packet/Presence$Type;
      //   57: if_acmpne +220 -> 277
      //   60: aload_2
      //   61: ldc 73
      //   63: ldc 75
      //   65: invokevirtual 79	org/jivesoftware/smack/packet/Presence:getExtension	(Ljava/lang/String;Ljava/lang/String;)Lorg/jivesoftware/smack/packet/PacketExtension;
      //   68: checkcast 81	org/jivesoftware/smackx/workgroup/packet/AgentStatus
      //   71: astore 12
      //   73: aload 12
      //   75: ifnull -36 -> 39
      //   78: aload_0
      //   79: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   82: invokestatic 85	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$1	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;)Ljava/lang/String;
      //   85: aload 12
      //   87: invokevirtual 88	org/jivesoftware/smackx/workgroup/packet/AgentStatus:getWorkgroupJID	()Ljava/lang/String;
      //   90: invokevirtual 94	java/lang/String:equals	(Ljava/lang/Object;)Z
      //   93: ifeq -54 -> 39
      //   96: aload_0
      //   97: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   100: invokestatic 98	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$2	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;)Ljava/util/Map;
      //   103: aload 4
      //   105: invokeinterface 104 2 0
      //   110: ifnonnull +98 -> 208
      //   113: new 106	java/util/HashMap
      //   116: dup
      //   117: invokespecial 107	java/util/HashMap:<init>	()V
      //   120: astore 13
      //   122: aload_0
      //   123: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   126: invokestatic 98	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$2	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;)Ljava/util/Map;
      //   129: aload 4
      //   131: aload 13
      //   133: invokeinterface 111 3 0
      //   138: pop
      //   139: aload 13
      //   141: monitorenter
      //   142: aload 13
      //   144: aload_3
      //   145: invokestatic 117	org/jivesoftware/smack/util/StringUtils:parseResource	(Ljava/lang/String;)Ljava/lang/String;
      //   148: aload_2
      //   149: invokeinterface 111 3 0
      //   154: pop
      //   155: aload 13
      //   157: monitorexit
      //   158: aload_0
      //   159: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   162: invokestatic 121	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$3	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;)Ljava/util/List;
      //   165: astore 17
      //   167: aload 17
      //   169: monitorenter
      //   170: aload_0
      //   171: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   174: invokestatic 121	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$3	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;)Ljava/util/List;
      //   177: invokeinterface 127 1 0
      //   182: astore 19
      //   184: aload 19
      //   186: invokeinterface 133 1 0
      //   191: ifne +47 -> 238
      //   194: aload 17
      //   196: monitorexit
      //   197: goto -158 -> 39
      //   200: astore 18
      //   202: aload 17
      //   204: monitorexit
      //   205: aload 18
      //   207: athrow
      //   208: aload_0
      //   209: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   212: invokestatic 98	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$2	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;)Ljava/util/Map;
      //   215: aload 4
      //   217: invokeinterface 104 2 0
      //   222: checkcast 100	java/util/Map
      //   225: astore 13
      //   227: goto -88 -> 139
      //   230: astore 15
      //   232: aload 13
      //   234: monitorexit
      //   235: aload 15
      //   237: athrow
      //   238: aload 19
      //   240: invokeinterface 137 1 0
      //   245: checkcast 90	java/lang/String
      //   248: invokevirtual 140	java/lang/String:toLowerCase	()Ljava/lang/String;
      //   251: aload 4
      //   253: invokestatic 143	org/jivesoftware/smack/util/StringUtils:parseBareAddress	(Ljava/lang/String;)Ljava/lang/String;
      //   256: invokevirtual 140	java/lang/String:toLowerCase	()Ljava/lang/String;
      //   259: invokevirtual 94	java/lang/String:equals	(Ljava/lang/Object;)Z
      //   262: ifeq -78 -> 184
      //   265: aload_0
      //   266: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   269: iconst_2
      //   270: aload_1
      //   271: invokestatic 147	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$4	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;ILjava/lang/Object;)V
      //   274: goto -90 -> 184
      //   277: aload_2
      //   278: invokevirtual 65	org/jivesoftware/smack/packet/Presence:getType	()Lorg/jivesoftware/smack/packet/Presence$Type;
      //   281: getstatic 150	org/jivesoftware/smack/packet/Presence$Type:unavailable	Lorg/jivesoftware/smack/packet/Presence$Type;
      //   284: if_acmpne -245 -> 39
      //   287: aload_0
      //   288: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   291: invokestatic 98	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$2	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;)Ljava/util/Map;
      //   294: aload 4
      //   296: invokeinterface 104 2 0
      //   301: ifnull +65 -> 366
      //   304: aload_0
      //   305: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   308: invokestatic 98	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$2	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;)Ljava/util/Map;
      //   311: aload 4
      //   313: invokeinterface 104 2 0
      //   318: checkcast 100	java/util/Map
      //   321: astore 8
      //   323: aload 8
      //   325: monitorenter
      //   326: aload 8
      //   328: aload_3
      //   329: invokestatic 117	org/jivesoftware/smack/util/StringUtils:parseResource	(Ljava/lang/String;)Ljava/lang/String;
      //   332: invokeinterface 153 2 0
      //   337: pop
      //   338: aload 8
      //   340: monitorexit
      //   341: aload 8
      //   343: invokeinterface 156 1 0
      //   348: ifeq +18 -> 366
      //   351: aload_0
      //   352: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   355: invokestatic 98	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$2	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;)Ljava/util/Map;
      //   358: aload 4
      //   360: invokeinterface 153 2 0
      //   365: pop
      //   366: aload_0
      //   367: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   370: invokestatic 121	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$3	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;)Ljava/util/List;
      //   373: astore 5
      //   375: aload 5
      //   377: monitorenter
      //   378: aload_0
      //   379: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   382: invokestatic 121	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$3	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;)Ljava/util/List;
      //   385: invokeinterface 127 1 0
      //   390: astore 7
      //   392: aload 7
      //   394: invokeinterface 133 1 0
      //   399: ifne +25 -> 424
      //   402: aload 5
      //   404: monitorexit
      //   405: goto -366 -> 39
      //   408: astore 6
      //   410: aload 5
      //   412: monitorexit
      //   413: aload 6
      //   415: athrow
      //   416: astore 9
      //   418: aload 8
      //   420: monitorexit
      //   421: aload 9
      //   423: athrow
      //   424: aload 7
      //   426: invokeinterface 137 1 0
      //   431: checkcast 90	java/lang/String
      //   434: invokevirtual 140	java/lang/String:toLowerCase	()Ljava/lang/String;
      //   437: aload 4
      //   439: invokestatic 143	org/jivesoftware/smack/util/StringUtils:parseBareAddress	(Ljava/lang/String;)Ljava/lang/String;
      //   442: invokevirtual 140	java/lang/String:toLowerCase	()Ljava/lang/String;
      //   445: invokevirtual 94	java/lang/String:equals	(Ljava/lang/Object;)Z
      //   448: ifeq -56 -> 392
      //   451: aload_0
      //   452: getfield 15	org/jivesoftware/smackx/workgroup/agent/AgentRoster$PresencePacketListener:this$0	Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;
      //   455: iconst_2
      //   456: aload_1
      //   457: invokestatic 147	org/jivesoftware/smackx/workgroup/agent/AgentRoster:access$4	(Lorg/jivesoftware/smackx/workgroup/agent/AgentRoster;ILjava/lang/Object;)V
      //   460: goto -68 -> 392
      //
      // Exception table:
      //   from	to	target	type
      //   170	205	200	finally
      //   238	274	200	finally
      //   142	158	230	finally
      //   232	235	230	finally
      //   378	413	408	finally
      //   424	460	408	finally
      //   326	341	416	finally
      //   418	421	416	finally
    }
  }
}